const util = {

     remote<T>(fn:string,param?:any):Promise<T>{
      return new Promise((resolve,reject)=>{
          // @ts-ignore
          aardio[fn](param).then((v:any)=>{
                if(v){
                    return resolve(JSON.parse(v));
                }
                return resolve(v);
          }).catch( (e : Error )=>{
              reject(e.message)
          })
      })
    }

}
export default util;